﻿using System.Xml.Serialization;

namespace MobySharp.Results.Shared
{
    public class MobyPost
    {
        [XmlElement(ElementName = "id")]
        public long ID { get; set; }

        [XmlElement(ElementName = "title")]
        public string Title { get; set; }

        [XmlElement(ElementName = "description")]
        public string Description { get; set; }

        [XmlElement(ElementName = "location_latlong")]
        public string LatLong { get; set; }

        [XmlElement(ElementName = "created_on")]
        public string CreatedOn { get; set; }

        [XmlElement(ElementName = "created_on_epoch")]
        public string CreatedOnEpoch { get; set; }

        [XmlElement(ElementName = "views")]
        public int Views { get; set; }

        [XmlElement(ElementName = "comments")]
        public int Comments { get; set; }

        [XmlElement(ElementName = "media")]
        public MobyMedia Media { get; set; }

        [XmlElement(ElementName = "device")]
        public MobyDevice Device { get; set; }

        [XmlElement(ElementName = "link")]
        public string Link { get; set; }

        [XmlElement(ElementName = "link_tiny")]
        public string LinkTiny { get; set; }

        #region Nested type: MobyDevice

        public class MobyDevice
        {
            [XmlElement(ElementName = "manufacturer")]
            public string Manufacturer { get; set; }

            [XmlElement(ElementName = "model")]
            public string Model { get; set; }
        }

        #endregion

        #region Nested type: MobyMedia

        public class MobyMedia
        {
            [XmlElement(ElementName = "url_thumbnail")]
            public string Thumb { get; set; }

            [XmlElement(ElementName = "url_square")]
            public string Square { get; set; }

            [XmlElement(ElementName = "url_full")]
            public string Full { get; set; }

            [XmlElement(ElementName = "type")]
            public string Type { get; set; }

            [XmlElement(ElementName = "original_width")]
            public int OriginalWidth { get; set; }

            [XmlElement(ElementName = "original_height")]
            public int OriginalHeight { get; set; }
        }

        #endregion
    }
}